home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / sos3-2.lha / Makefile < prev   
Makefile  |  1992-02-13  |  9KB  |  410 lines

  1. # --------------------------------------------------------------------------
  2. # Copyright 1992 by Forschungszentrum Informatik (FZI)
  3. #
  4. # You can use and distribute this software under the terms of the licence
  5. # you should have received along with this program.
  6. # If not or if you want additional information, write to
  7. # Forschungszentrum Informatik, "STONE", Haid-und-Neu-Strasse 10-14,
  8. # D-7500 Karlsruhe 1, Germany.
  9. # --------------------------------------------------------------------------
  10. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  11. # Makefile for SOS-Version SOS3-2 | 09-09-91 | Dietmar Theobald
  12. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  13.  
  14.  
  15. SOSPATH=__SOS_INSTALLED_PATH__
  16.  
  17. include $(SOSPATH)/commands.mk
  18. include $(SOSPATH)/definitions.mk
  19.  
  20. # ~~~~~~~
  21.  
  22. default: all
  23.  
  24. LIB_RETAIN='(gsh_main.o|gsh_err.o|dir_main.o)'
  25. clear_lib:
  26.     @ cd $(SOSLIB) ;\
  27.       files="`echo *.o | tr ' ' '\12' | egrep -v $(LIB_RETAIN)`" ;\
  28.       set -x ; rm -f $$files
  29.  
  30. # ~~~~~~~
  31.  
  32.  
  33. INCLUDES = $(SOS_INCLUDES) -I$(TRC)
  34.  
  35. .SUFFIXES:
  36.  
  37. #
  38. # definitions for module psm
  39. #
  40. USE_FCNTL=#-DLOCKD_CORRECT
  41.  
  42. #
  43. # definitions for module cci
  44. #
  45. ECHOXX=TRUE
  46. LDXX  =/usr/local/lib/gcc-ld
  47. CRTXX =/usr/local/lib/crt1+.o
  48. LIBSXX=-lg++ /usr/local/lib/gcc-gnulib -lc
  49.  
  50. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  51. # main dependencies
  52. # ('init' is excluded from 'all' since it is only needed during 
  53. #  a bootstrap)
  54. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  55.  
  56. all:      lib compiler tools demos Xtools
  57.  
  58. lib:            $(sos.a)
  59. compiler:      cfe genCC scp sil
  60. boot_compiler: cfe genCC scp init
  61. tools:           dmp cnt
  62. Xtools:           dir gsh
  63. demos:           demo
  64.  
  65. init:    $(SOSBIN)/init
  66. cfe:    $(SOSBIN)/cfe
  67. genCC:    $(SOSBIN)/genCC
  68. scp:    $(SOSBIN)/scp
  69.  
  70. sil:     $(SOSBIN)/sil
  71. dmp:     $(SOSBIN)/dmp
  72. gsh:     $(SOSBIN)/gsh
  73. dir:     $(SOSBIN)/dir
  74. cnt:     $(SOSBIN)/cnt
  75.  
  76. demo:     $(SOSBIN)/demo
  77.  
  78.  
  79. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  80. # SOS library
  81. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  82.  
  83. $(sos.o): $(sos.c)
  84.     $(COMP.CC) -I$(KNL) -I$(CCI) $(SOS)/sos.c
  85.  
  86. $(sos.a): $(sos.o) \
  87.       $(smg.o) \
  88.       $(psm.o) $(mon.o) $(psm_err.o) \
  89.       $(err.o) $(trc.o) \
  90.       $(agg_sos.o) $(Aggregate.o) $(Array.o)      $(Association.o)    \
  91.                  $(Bag.o)          $(Collection.o) $(List.o)        \
  92.                $(Mapping.o)   $(Set.o)          $(agg_err.o)    \
  93.       $(cci_sos.o) $(cci.o) $(cci_err.o) \
  94.       $(dir_sos.o) $(dir.o) $(dir_err.o) \
  95.       $(knl_sos.o) $(knl.o) $(knl_err.o) \
  96.       $(mta_sos.o) $(mta.o) $(mta_err.o)
  97.     ar rl $@ $?         ;\
  98.     ranlib $@
  99.  
  100.  
  101. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  102. # basic SOS modules
  103. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  104.  
  105. # ~~~~~~~~~~~~~
  106. # module:   trc
  107. # ~~~~~~~~~~~~~
  108.  
  109. $(trc.o): $(trc.c)
  110.     $(COMP.cc) $(TRC)/trc.c
  111.  
  112.  
  113. # ~~~~~~~~~~~~~
  114. # module:   smg
  115. # ~~~~~~~~~~~~~
  116.  
  117. $(smg.o): $(smg.c)
  118.     $(COMP.CC) $(SMG)/smg.c
  119.  
  120.  
  121. # ~~~~~~~~~~~~~
  122. # module:   err
  123. # ~~~~~~~~~~~~~
  124.  
  125. $(err.o): $(err.c)
  126.     $(COMP.CC) $(ERR)/err.c
  127.  
  128.  
  129. # ~~~~~~~~~~~~~
  130. # module:   psm
  131. # ~~~~~~~~~~~~~
  132.  
  133. $(psm.o): $(psm.c)
  134.     $(COMP.CC) $(USE_FCNTL) $(PSM)/psm.c
  135.  
  136. $(mon.o): $(mon.c)
  137.     $(COMP.CC) $(PSM)/mon.c
  138.  
  139. $(psm_err.o): $(psm_err.c)
  140.     $(COMP.CC) $(PSM)/psm_err.c
  141.  
  142.  
  143. $(cnt_main.o): $(cnt_main.c)
  144.     $(COMP.CC) $(PSM)/cnt_main.c
  145.  
  146. $(SOSBIN)/cnt: $(cnt_main.o) $(sos.a)
  147.     $(LINK.CC) $(cnt_main.o) $(sos.a) $(LDFLAGS.s)
  148.  
  149.  
  150. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  151. # SOS core schemas
  152. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  153.  
  154. # ~~~~~~~~~~~~~
  155. # module:   agg
  156. # ~~~~~~~~~~~~~
  157.  
  158. $(AGG)/agg_sos.c $(AGG)/agg_use.h $(AGG)/agg_sos.h: $(AGG)/agg.sos
  159.     $(SOS.CMP) agg
  160.  
  161. $(agg_sos.o): $(agg_sos.c)
  162.     $(SOS.LARGEIF_CC) $(AGG)/agg_sos.c
  163.  
  164.  
  165. $(Aggregate.o):   $(Aggregate.c)
  166.     $(SOS.CC) $(AGG)/Aggregate.c
  167.  
  168. $(Array.o):      $(Array.c)
  169.     $(SOS.CC) -I$(KNL) $(AGG)/Array.c
  170.  
  171. $(Association.o): $(Association.c)
  172.     $(SOS.CC) $(AGG)/Association.c
  173.  
  174. $(Bag.o):       $(Bag.c)
  175.     $(SOS.CC) $(AGG)/Bag.c
  176.  
  177. $(Collection.o):  $(Collection.c)
  178.     $(SOS.CC) $(AGG)/Collection.c
  179.  
  180. $(List.o):      $(List.c)
  181.     $(SOS.CC) $(AGG)/List.c
  182.  
  183. $(Mapping.o):      $(Mapping.c)
  184.     $(SOS.CC) $(AGG)/Mapping.c
  185.  
  186. $(Set.o):      $(Set.c)
  187.     $(SOS.CC) $(AGG)/Set.c
  188.  
  189. $(agg_err.o):      $(agg_err.c)
  190.     $(SOS.CC) -no_scp $(AGG)/agg_err.c
  191.  
  192.  
  193. # ~~~~~~~~~~~~~
  194. # module:   knl
  195. # ~~~~~~~~~~~~~
  196.  
  197. $(KNL)/knl_sos.c $(KNL)/knl_use.h $(KNL)/knl_sos.h: $(KNL)/knl.sos
  198.     $(SOS.CMP) knl
  199.  
  200. $(knl_sos.o): $(knl_sos.c)
  201.     $(SOS.IF_CC) $(KNL)/knl_sos.c
  202.  
  203.  
  204. $(knl.o): $(knl.c)
  205.     $(SOS.CC) $(KNL)/knl.c
  206.  
  207. $(knl_err.o): $(knl_err.c)
  208.     $(SOS.CC) -no_scp $(KNL)/knl_err.c
  209.  
  210.  
  211. # ~~~~~~~~~~~~~
  212. # module:   mta
  213. # ~~~~~~~~~~~~~
  214.  
  215. $(MTA)/mta_sos.c $(MTA)/mta_use.h $(MTA)/mta_sos.h: $(MTA)/mta.sos
  216.     $(SOS.CMP) mta
  217.  
  218. $(mta_sos.o): $(mta_sos.c)
  219.     $(SOS.LARGEIF_CC) $(MTA)/mta_sos.c
  220.  
  221.  
  222. $(mta.o): $(mta.c)
  223.     $(SOS.CC) $(MTA)/mta.c
  224.  
  225. $(mta_err.o): $(mta_err.c)
  226.     $(SOS.CC) -no_scp $(MTA)/mta_err.c
  227.  
  228.  
  229. # ~~~~~~~~~~~~~
  230. # module:   dir
  231. # ~~~~~~~~~~~~~
  232.  
  233. $(DIR)/dir_sos.c $(DIR)/dir_use.h $(DIR)/dir_sos.h: $(DIR)/dir.sos
  234.     $(SOS.CMP) dir
  235.  
  236. $(dir_sos.o): $(dir_sos.c)
  237.     $(SOS.IF_CC) $(DIR)/dir_sos.c
  238.  
  239.  
  240. $(dir.o): $(dir.c)
  241.     $(SOS.CC) $(DIR)/dir.c
  242.  
  243. $(dir_err.o): $(dir_err.c)
  244.     $(SOS.CC) -no_scp $(DIR)/dir_err.c
  245.  
  246.  
  247. $(dir_main.o): $(dir_main.c)
  248.     $(COMP.CC) $(DIR)/dir_main.c
  249.  
  250. $(SOSBIN)/dir: $(dir_main.o) $(dir.o) $(sos.a)
  251.     $(LINK.CC) $(dir_main.o) $(dir.o) $(trc.o) $(sos.a) $(XLIBS) $(LDFLAGS)
  252.  
  253.  
  254. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  255. # SOS compiler front end
  256. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  257.  
  258. # ~~~~~~~~~~~~~
  259. # module:   cfe
  260. # ~~~~~~~~~~~~~
  261.  
  262. $(CFE)/cfe_lex.h: $(CFE)/cfe.l
  263.     $(LEX.CC)
  264. $(CFE)/cfe_yacc.c: $(CFE)/cfe.y
  265.     $(YACC.CC)
  266.  
  267. $(cfe.o): $(cfe.c)
  268.     $(COMP.CC) $(CFE)/cfe.c
  269.  
  270. $(cfe_yacc.o): $(cfe_yacc.c)
  271.     $(COMP.CC) $(CFE)/cfe_yacc.c
  272.  
  273. $(cfe_main.o): $(cfe_main.c)
  274.     $(COMP.CC) $(CFE)/cfe_main.c
  275.  
  276. $(cfe_err.o): $(cfe_err.c)
  277.     $(COMP.CC) $(CFE)/cfe_err.c
  278.  
  279. $(SOSBIN)/cfe: $(cfe_main.o) $(cfe.o) $(cfe_yacc.o) $(cfe_err.o) $(sos.a)
  280.     $(LINK.CC) $(cfe_main.o) $(cfe.o) $(cfe_yacc.o) $(cfe_err.o) $(sos.a) -ll $(LDFLAGS.s)
  281.  
  282.  
  283. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  284. # host language C++: compiler back end & C++ implementation interface
  285. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  286.  
  287. # ~~~~~~~~~~~~~~~
  288. # module:   genCC
  289. # ~~~~~~~~~~~~~~~
  290.  
  291. $(genCC.o): $(genCC.c)
  292.     $(COMP.CC) $(GENCC)/genCC.c
  293.  
  294. $(genCC_main.o): $(genCC_main.c)
  295.     $(COMP.CC) $(GENCC)/genCC_main.c    
  296.  
  297. $(genCC_err.o): $(genCC_err.c)
  298.     $(COMP.CC) $(GENCC)/genCC_err.c
  299.  
  300.  
  301. $(SOSBIN)/genCC: $(genCC_main.o) $(genCC.o) $(genCC_err.o) $(sos.a)
  302.     $(LINK.CC) $(genCC_main.o) $(genCC.o) $(genCC_err.o) $(sos.a) $(LDFLAGS.s)
  303.  
  304.  
  305. # ~~~~~~~~~~~~~
  306. # module:   cci
  307. # ~~~~~~~~~~~~~
  308.  
  309. $(CCI)/cci_sos.c $(CCI)/cci_use.h $(CCI)/cci_sos.h: $(CCI)/cci.sos
  310.     $(SOS.CMP) cci
  311.  
  312. $(cci_sos.o): $(cci_sos.c)
  313.     $(SOS.IF_CC) $(CCI)/cci_sos.c
  314.  
  315.  
  316. $(cci.o): $(cci.c)
  317.     $(SOS.CC) $(CCI)/cci.c '-DLDXX="$(LDXX)"'     '-DCRTXX="$(CRTXX)"' \
  318.                    '-DLIBSXX="$(LIBSXX)"' '-DECHOXX=$(ECHOXX)'
  319.  
  320. $(cci_err.o): $(cci_err.c)
  321.     $(SOS.CC) -no_scp $(CCI)/cci_err.c
  322.  
  323.  
  324. $(sil_main.o): $(sil_main.c)
  325.     $(COMP.CC) $(CCI)/sil_main.c
  326.  
  327. $(SOSBIN)/sil: $(sil_main.o) $(sos.a)
  328.     $(LINK.CC) $(sil_main.o) $(sos.a) $(LDFLAGS)
  329.  
  330.  
  331. # ~~~~~~~~~~~~~
  332. # module:   scp
  333. # ~~~~~~~~~~~~~
  334.  
  335. $(SCP)/scp_lex.h: $(SCP)/scp.l
  336.     $(LEX.CC)
  337. $(SCP)/scp_yacc.c: $(SCP)/scp.y
  338.     $(YACC.CC)
  339.  
  340.  
  341. $(scp_yacc.o): $(scp_yacc.c)
  342.     $(COMP.CC) $(SCP)/scp_yacc.c
  343.  
  344. $(scp_main.o): $(scp_main.c)
  345.     $(COMP.CC) $(SCP)/scp_main.c
  346.  
  347. $(scp_err.o): $(scp_err.c)
  348.     $(COMP.CC) $(SCP)/scp_err.c
  349.  
  350. $(SOSBIN)/scp: $(scp_main.o) $(scp_yacc.o) $(scp_err.o) $(sos.a)
  351.     $(LINK.CC) $(scp_main.o) $(scp_yacc.o) $(scp_err.o) $(sos.a) -ll $(LDFLAGS.s)
  352.  
  353.  
  354. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  355. # SOS tools
  356. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  357.  
  358. # ~~~~~~~~~~~~~
  359. # module:   dmp
  360. # ~~~~~~~~~~~~~
  361.  
  362. $(dmp_main.o): $(dmp_main.c)
  363.     $(COMP.CC) $(DMP)/dmp_main.c
  364.  
  365. $(dmp_err.o): $(dmp_err.c)
  366.     $(COMP.CC) $(DMP)/dmp_err.c
  367.  
  368. $(SOSBIN)/dmp: $(dmp_main.o) $(dmp_err.o) $(sos.a)
  369.     $(LINK.CC) $(dmp_main.o) $(dmp_err.o) $(sos.a) $(LDFLAGS)
  370.  
  371.  
  372. # ~~~~~~~~~~~~~
  373. # module:   gsh
  374. # ~~~~~~~~~~~~~
  375.  
  376. $(gsh_main.o): $(gsh_main.c)
  377.     $(COMP.CC) $(GSH)/gsh_main.c
  378.  
  379. $(gsh_err.o): $(gsh_err.c)
  380.     $(COMP.CC) $(GSH)/gsh_err.c
  381.  
  382. $(SOSBIN)/gsh: $(gsh_main.o) $(gsh_err.o) $(sos.a)
  383.     $(LINK.CC) $(gsh_main.o) $(gsh_err.o) $(trc.o) $(sos.a) $(XLIBS) $(LDFLAGS)
  384.  
  385.  
  386. # ~~~~~~~~~~~~~~
  387. # module:   init
  388. # ~~~~~~~~~~~~~~
  389.  
  390. $(init_main.o): $(init_main.c)
  391.     $(COMP.CC) $(INIT)/init_main.c
  392.  
  393. $(SOSBIN)/init: $(init_main.o) $(sos.a)
  394.     $(LINK.CC) $(init_main.o) $(sos.a) $(LDFLAGS.s)
  395.  
  396.  
  397. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  398. # SOS demo programs
  399. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  400.  
  401. # ~~~~~~~~~~~~~~
  402. # module:   demo
  403. # ~~~~~~~~~~~~~~
  404.  
  405. $(demo_main.o): $(demo_main.c)
  406.     $(COMP.CC) $(DEMO)/demo_main.c
  407.  
  408. $(SOSBIN)/demo: $(demo_main.o) $(sos.a)
  409.     $(LINK.CC) $(demo_main.o) $(sos.a) $(LDFLAGS.s)
  410.